﻿using System.Collections.Generic;

namespace Zinnia.Common.DTO
{
    /// <summary>
    /// 响应模型
    /// </summary>
    public interface IReponseModel
    {
        /// <summary>
        /// 响应码
        /// </summary>
        int code { get; }
        /// <summary>
        /// 响应码消息
        /// </summary>
        string msg { get; }
    }
    /// <summary>
    /// 分页响应模型
    /// </summary>
    public interface IGridReponseModel<T> : IReponseModel where T : new()
    {
        /// <summary>
        /// 页码
        /// </summary>
        int page { get; }
        /// <summary>
        /// 总数
        /// </summary>
        int total { get; }
        /// <summary>
        /// 当前返回数量
        /// </summary>
        int count { get; }
        /// <summary>
        /// 请求数量
        /// </summary>
        int size { get; }

        /// <summary>
        /// 总页数
        /// </summary>
        int allPages { get; }

        /// <summary>
        /// 数据行
        /// </summary>
        List<T> rows { get; }
    }
}
